<?php
// +----------------------------------------------------------------------
// | OneThink [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013 http://www.onethink.cn All rights reserved.
// +----------------------------------------------------------------------
// | Author: 麦当苗儿 <zuojiazi@vip.qq.com> <http://www.zjzit.cn>
// +----------------------------------------------------------------------

namespace Admin\Controller;

/**
 * 后台首页控制器
 * @author 麦当苗儿 <zuojiazi@vip.qq.com>
 */
class IndexController extends AdminController {

    /**
     * 后台首页
     * @author 麦当苗儿 <zuojiazi@vip.qq.com>
     */
    public function index(){
        // \FirePHPCore\FB::info('index/index');
        if(UID){
            if(IS_ROOT){
                $__MENU__ = $this->getMenus();
            }else{
                $__MENU__ = $this->getMenus(0, true);
            }
            $this->assign('__MENU__', $__MENU__);
            $this->display();
        } else {
            $this->redirect('Public/login');
        }
    }
    /**
     * 我的主页
     */
    public function homePage(){
        $this->display();
    }

}
